import request from '@/utils/request';

const workspaceApi = {};

workspaceApi.mapping = (params) => {
	return request({
		url: '/platform-api/workspace/mapping',
		method: 'post',
		data: params,
	})
}
workspaceApi.list = () => {
	return request({
		url: '/platform-api/workspace/list',
		method: 'get',
	})
}
workspaceApi.page = (params) => {
	return request({
		url: '/platform-api/workspace/page',
		method: 'get',
		params: params,
	})
}
workspaceApi.add = (params) => {
	return request({
		url: '/platform-api/workspace',
		method: 'post',
		data: params,
	})
}
workspaceApi.update = (params) => {
	return request({
		url: '/platform-api/workspace',
		method: 'put',
		data: params,
	})
}
workspaceApi.get = (id) => {
	return request({
		url: '/platform-api/workspace/' + id,
		method: 'get',
	})
}
workspaceApi.delete = (id) => {
	return request({
		url: '/platform-api/workspace/' + id,
		method: 'delete',
	})
}


export default workspaceApi